using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class Sale_Discount_HistoryMap : EntityTypeConfiguration<Sale_Discount_History>
    {
        public Sale_Discount_HistoryMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Item)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("Sale_Discount_History");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.Item).HasColumnName("Item");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.Old_Price).HasColumnName("Old Price");
            this.Property(t => t.New_Price).HasColumnName("New Price");
            this.Property(t => t.Old_WholePrice).HasColumnName("Old WholePrice");
            this.Property(t => t.New_WholePrice).HasColumnName("New WholePrice");
        }
    }
}
